<%-- 
    Document   : productDetails
    Created on : Jul 6, 2011, 3:10:43 PM
    Author     : ThanhToan
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="java.io.File" %>
<%@ page import="org.apache.commons.fileupload.servlet.ServletFileUpload"%>
<%@ page import="org.apache.commons.fileupload.disk.DiskFileItemFactory"%>
<%@ page import="org.apache.commons.fileupload.*"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<%@ page import="dao.ProductDAO" %>
<%@ page import="dao.CategoriesDAO" %>
<%@ page import="model.ProductModel" %>
<%@ page import="model.CategoriesModel" %>
<%@page import="java.util.ArrayList"%>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Product Details Page</title>
    </head>
    <body>
        <div id="main_container">
		<!-- S HEAD CONTENT -->
			<jsp:include page="block/header.jsp" />
		<!-- E HEAD CONTENT -->

		<!-- S Top Menu -->
			<jsp:include page="block/top_menu.jsp" />
		<!-- E Top Menu -->

                <!-- S Left Menu -->
			<jsp:include page="block/left_menu.jsp" />
		<!-- E Left Menu -->

		<!-- S Body Content -->
                <form action="<%=request.getContextPath()%>/UserController" method="post" id="productDetails" name="productDetails">
                    <table border="0" cellpadding="3" cellspacing="8" align="center">
                        <tr>
                            <td align="center" colspan="4"> <h1>Product Details</h1> </td>
                        </tr>
                        <tr>
                            <td>Product name : </td>
                            <td> <input type="text" id="txtProName" name="txtProName" maxlength="100" style="background: transparent; color: blue; width: 200px" /></td>
                        </tr>
                        <tr>
                            <td>Catogories : </td>
                            <td>
                                <select name="cboCategories" id="cboCategories" onchange="" style="width: 200px">
                                    <option value=""> ------------------ </option>
                                    <c:forEach var="objCategories" items="<%= CategoriesDAO.getAllCategories() %>">
                                        <option value="${objCategories.id}" <c:if test="">selected</c:if>>${objCategories.cateName}</option>
                                    </c:forEach>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td>Image : </td>
                            <td>
                                <img src="" alt="" border="0" />
                                <br/>
                                <input name="file" type="file" id="file">
                            </td>
                        </tr>
                        <tr>
                            <td>Description : </td>
                            <td>
                                <textarea id="txtProDes" name="txtProDes" rows="5" cols="25" style="background-color: transparent; background-position: left"></textarea>
                            </td>
                        </tr>
                        <tr>
                            <td>Price : </td>
                            <td>
                                <input type="text" id="txtPrice" name="txtPrice" maxlength="80" style="background: transparent; color: blue; width: 200px" /> (USD)
                            </td>
                        </tr>
                        <tr>
                            <td align="center" colspan="2">
                                <input type="button" id="btSub" name="btSub" value="Submit" style="width: 70px; color: navy" onclick="submitFormRegister();"/>
                                <input type="reset" id="btReset" name="btReset" value="Reset" style="width: 70px; color: navy"/>
                            </td>
                        </tr>
                    </table>
                </form>
		<!-- E Body Content -->
	</div>
    </body>
</html>
